using Mathmall.Administration.common;
using Mathmall.Administration.Vo;
using Microsoft.AspNetCore.Identity;

namespace Mathmall.Administration.Service;

public interface IRoleService
{
    /// <summary>
    /// 添加角色
    /// </summary>
    /// <param name="roleName"></param>
    // Task<IdentityResult> AddRole(string roleName);
    Task<IdentityResult> AddRole(string roleName);

    /// <summary>
    /// 分页查询全部角色
    /// <param name="pageIndex"></param>
    /// <param name="pageSize"></param>
    /// <param name="condition"></param>
    /// </summary>
    /// <returns></returns>
    Task<PaginatedList<IdentityRole<int>>> PageNationQuery(int pageIndex, int pageSize, string condition);

    /// <summary>
    /// 查询全部角色
    /// </summary>
    /// <returns></returns>
    Task<List<IdentityRole<int>>> QueryAllRoles();

    /// <summary>
    /// 更新角色名称
    /// </summary>
    /// <param name="role"></param>
    /// <returns></returns>
    Task<IdentityResult> UpdateRole(IdentityRole<int> role);

    /// <summary>
    /// 删除角色对应的权限
    /// </summary>
    /// <param name="role"></param>
    /// <returns></returns>
    Task<IdentityResult> DeleteRole(IdentityRole<int> role);
}